import { createSSRApp } from "vue"
import App from "./App.vue"
import { createPinia } from 'pinia'
import { setupRouterGuard } from './router'

export function createApp() {
  const app = createSSRApp(App)
  const pinia = createPinia()
  
  app.use(pinia)
  
  // 初始化路由守卫
  setupRouterGuard()
  
  return {
    app,
    pinia
  }
}
